<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <link rel="stylesheet" href=" https://at.alicdn.com/t/font_2225064_e4j7u33z4bm.css">
  </head>
  <body>
    <div id="app">
      <h1>{{msg}}</h1>

      <span class=" iconfont   icon-yundong "></span>

      <home>
         <!-- 在组件这里写东西就是插槽 -->
         <!--我想加一个字体图标 -->
         <span class="iconfont   icon-yundong"></span>
      </home>

      <home>
            <!-- 在组件这里写东西就是插槽 -->
            <!--我想加一个字体图标 -->
        <span class="iconfont   icon-shuiguo"></span>
      </home>
    </div>

    <template id="home">
      <div>
        <h2> <slot></slot> home组件</h2>
      </div>
    </template>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>

      Vue.component("home",{
        template:'#home'
      })
      var vm = new Vue({
        el: "#app",
        data: {
          msg: "vue",
        },
        methods: {},
      });
    </script>
  </body>
</html>
